/**
 * 
 */
package org.vsg.stock.core.indicator.coordinate;

import org.vsg.stock.core.utils.StockDateUtilExtension;

/**
 * @author Bill vison
 *
 */
public class CoordinateFactory {
	
	
	private static CoordinateFactory factory;
	
	private CoordinateFactory() {
		
	}
	
	/**
	 * get the new factory instance 
	 * @return
	 */
	public static final CoordinateFactory getInstance() {
		if ( factory == null) {
			factory = new CoordinateFactory();
		}
		return factory;
	}
	
	
	public DefaultCoordinate createCoordinateInstance(
			String stockCode ,
			CoordinateConfiguration coorConf , StockDateUtilExtension utilExtension) {
		
		DefaultCoordinate coordinate = new DefaultCoordinate();

		coordinate.setConfiguration( coorConf );
		coordinate.setStockCode(stockCode);
		coordinate.setStkDateUtilExtension(utilExtension);
		
		coordinate.init();		
		
		return coordinate;
	}
	
	
	
	


}
